<template>
  <div class="app-container">
    <component :is="dynamicComponent"></component>
  </div>
</template>

<script>
import dept from './dept/index.vue'
import jxb from './jxb/index.vue'
export default {
  name: 'cadre-supervision',
  props: {},
  components: { dept, jxb },
  data() {
    return {
      dynamicComponent: 'dept'
    }
  },
  created() {
    // 验证用户是否具备某角色
    let isJXB = this.$auth.hasRole('performanceOffice')
    if (isJXB) {
      this.dynamicComponent = 'jxb'
    } else {
      this.dynamicComponent = 'dept'
    }
  },
  computed: {},
  watch: {},
  methods: {}
}
</script>

<style lang="scss"></style>
